<?php
/**
 * Author: lf
 * Blog: https://blog.szdma.com
 * Email: job@szdma.com
 * Created at: 2016-03-21 18:46.
 */

namespace backend\grid;

use kartik\grid\DataColumn as kartikDataColumn;

/**
 * {@inheritdoc}
 */
class DataColumn extends kartikDataColumn
{
    public $headerOptions = [];

    public $width;

    public $contentOptions = ['style' => 'word-wrap: break-word; word-break: break-all;'];

    /**
     * {@inheritdoc}
     */
    public function init()
    {
        parent::init();
        if (!isset($this->headerOptions['width']) && isset($this->width)) {
            $this->headerOptions['width'] = $this->width;
        }
    }
}
